package com.sikaryofficial.backend.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sikaryofficial.backend.domain.entity.ActivityPrizeRelation;
import com.sikaryofficial.backend.domain.vo.ActivityResultCacheVO;
import com.sikaryofficial.backend.domain.vo.PointConsumerVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 活动奖品Mapper接口
 *
 * @author qinjinyuan
 * @date 2024-07-15
 */
public interface ActivityPrizeRelationMapper extends BaseMapper<ActivityPrizeRelation> {
    /**
     * 检查与活动关联的 所有礼品概率之和是否为100%
     *
     * @param activityId ID
     * @return
     */
    double checkWinRatioRelation(@Param("activityId") Long activityId);

    /**
     * @param activityIds ID集合
     * @return
     */
    List<PointConsumerVO> getPointConsumerList(@Param("activityIds") List<Long> activityIds);

    /**
     * 获取已中实物奖结果数据
     * @param activityIds
     * @return
     */
    List<ActivityResultCacheVO> getActivityResultCacheList(@Param("activityIds") List<Long> activityIds);
}
